import { Inject, Provide } from '@midwayjs/core';
import { BaseService, CoolCommException } from '@cool-midway/core';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';
import { FinanceProfitEntity } from '../entity/profit';
import { UserInfoService } from '../../user/service/info';
import { UserRelationEntity } from '../../user/entity/user_relation';
import { OrderOrderEntity } from '../../order/entity/order';

/**
 * 分润记录
 */
@Provide()
export class FinanceProfitService extends BaseService {
  @InjectEntityModel(FinanceProfitEntity)
  financeProfitEntity: Repository<FinanceProfitEntity>;

  @Inject()
  userInfoService: UserInfoService;

  @InjectEntityModel(UserRelationEntity)
  userRelationEntity: Repository<UserRelationEntity>;

  @InjectEntityModel(OrderOrderEntity)
  orderOrderEntity: Repository<OrderOrderEntity>;
}
